<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-畅销商品管理">
</@frame.head>
<div class="page-container" style="overflow:auto;height: 420px;">
	<form action="/productQuestions/examine" 
		method="post" id="productformlist" 
		name="productformlist">
		
		<table  width="100%" border="0" cellspacing="1">
		<input type="hidden" value="${productQuestions.id}" name="QuestionId" id="QuestionId" />
			<tr style="width: 100%">
				<td >
					咨询人卡号：${productQuestions.memberNo}
				</td>
				<td >
					商品编号：${productQuestions.product.id}
				</td>
			</tr>
			<tr style="width: 500px">
				<td >
					咨询人姓名：${productQuestions.askName}
				</td>
				<td >
					商品名称：${productQuestions.product.baseInfo.name}
				</td>
			</tr>
			<tr style="width: 500px">
				<td >
					咨询时间：${(productQuestions.askDate?string("yyyy-MM-dd HH:mm:ss"))!}
				</td>
				<td >
					咨询类型：${productQuestions.classifiedConsultation.name}
				</td>
			</tr>
			<tr style="width: 500px">
				<td colspan="2">
					咨询内容：${productQuestions.question}
				</td>
				<td >
					
				</td>
			</tr>
			<tr>
			<td  colspan="2">
			回复内容：<textarea style="width: 500px;height: 150px;" id="answer" name="answer">${productQuestions.answer}</textarea>
			</td>
			</tr>
			<tr>
			<td  >
			回复时间：${(productQuestions.answerDate?string("yyyy-MM-dd HH:mm:ss"))!}
			</td>
			<td>
			回复人：${productQuestions.answerUserName}
			</td>
			</tr>
			<#if productQuestions.examineStatus==2>
                                       <tr>
                                       	<td>审核结果：通过</td>
                                       </tr>
                                       <tr>
                                       	<td>审核时间：${(productQuestions.examineDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
                                       </tr>
                                       <tr>
                                       	<td>审核人：${productQuestions.examineUserName}</td>
                                       </tr>
                                 </#if>
			<tr>
			<#if productQuestions.examineStatus!=2>
			<td >
		
			<input type="button" class="btn btn-success radius" value="审核通过" style="float: right;" onclick="buSubmit(1)"/>
			</td>
			</#if>
			<td >
			
			<input type="button"  class="btn btn-danger radius" value="审核驳回" style="float: right;" onclick="buSubmit(2)"/>
				</td>
				</tr>
			</table>
		</form>
</div>
<script type="text/javascript" src="${contextPath}/resources/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
		<script type="text/javascript">

		var path="${contextPath}";

		//提交
		function buSubmit(isExamine){
				var QuestionId=$("#QuestionId").val();
				
				$.ajax({
				     url:path+"/productQuestions/examine",
				     type:"post",
				     data:{"QuestionId":QuestionId,"isExamine":isExamine},
				     dataType:"text",
				     beforeSend:function(){},
				     error:function(XMLHttpRequest,textStatus,errorThrown){
				    	 parent.window.location.href = parent.window.location.href;
				     },
				     success:function(msg){

						    layer.msg('审核成功!',{icon:1,time:1000},function(){

						    	parent.window.location.href = parent.window.location.href;


						    });
				     	
				      }
				     });
				
				
			
			
		}
			
		</script>

	</body>


